GdkWindowImplClass *impl_class;
gboolean save_region = FALSE;
GdkRectangle clip_box;
+ int iteration;
/* Ensure the window lives while updating it */
g_object_ref (window);
/* If an update got queued during update processing, we can get a
* window in the update queue that has an empty update_area.
* just ignore it.
+ *
+ * We run this multiple times if needed because on win32 the
+ * first run can cause new (synchronous) updates from
+ * gdk_window_flush_outstanding_moves(). However, we
+ * limit it to two iterations to avoid any potential loops.
*/
- if (window->update_area)
+ iteration = 0;
+ while (window->update_area &&
+ iteration++ < 2)
{
cairo_region_t *update_area = window->update_area;
window->update_area = NULL;